package com.fosu.web.controller;


import com.fosu.common.ResponseResult;
import com.fosu.domain.Carousel;
import com.fosu.service.CarouselService;
import com.fosu.service.impl.CarouselServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * Desription
 *
 * @author manno
 * @date 2020/10/15
 */
@RestController
@CrossOrigin
@RequestMapping("carousel")
public class CarouselController
{
    @Autowired
    CarouselService carouselService;

    /**获取所有轮播图*/
    @GetMapping("/getCarousels")
    public ResponseResult getCarousels( HttpServletResponse resp)
    {
        return carouselService.getCarousels(resp);
    }
}
